********************************************************************************
//                School Breakfast and Academic Achievemnet                   //
//                       Economics of Eduction Review                         //
//                  Cuadros-Menaca, Thomsen, and Nayga (2021)                 //
********************************************************************************

global d_user "Your Directory" //Set the directory :)
set more off

use "$d_user\Working_Data.dta", clear
xtset ID GradeLevel
global covariates Boy Minority Ecodis Bus TotalStudents CertifiedTeacherTotal
egen long SchoolFE = group(SchoolLEA)

//Table 3

*Dottier(2012), Imberman(2013), and Corcoran(2014)

xtreg ZMath BAB i.GradeLevel i.SchoolFE i.Year, cluster (SchoolLEA) nonest
xtreg ZMath BAB i.GradeLevel i.SchoolFE i.Year $covariates, cluster (SchoolLEA) nonest

xtreg ZELA BAB i.GradeLevel i.SchoolFE i.Year, cluster (SchoolLEA) nonest
xtreg ZELA BAB i.GradeLevel i.SchoolFE i.Year $covariates, cluster (SchoolLEA) nonest

*Callaway and Santa'Anna

xtreg ZMath BAB i.GradeLevel i.Effgrade i.Year $covariates, cluster (SchoolLEA) nonest
xtreg ZELA BAB i.GradeLevel i.Effgrade i.Year $covariates, cluster (SchoolLEA) nonest


xtreg ZMath BAB i.Effgrade i.Year $covariates, cluster (SchoolLEA) nonest
xtreg ZELA BAB i.Effgrade i.Year $covariates, cluster (SchoolLEA) nonest
